Table of Contents
Previous Section
Writing a WebObjects application involves creating a component for each page in the application and installing the components in a directory that's accessible to WebObjects and your Web server.
Hello World has two components---Main and Hello. The component for the first page of a WebObjects application is always named Main. When a user opens the URL for a WebObjects application, the DefaultApp program looks for a component named Main to represent the first page.
Generally, all the components for an application are installed in a single application directory anywhere in <DocumentRoot>/WebObjects. For example, the Hello World application directory is <DocumentRoot>/WebObjects/Examples/HelloWorld.
The only components that might not be installed in an application directory are reusable components used by multiple applications. These reusable components are installed directly under <DocumentRoot>/WebObjects so all applications can access them. Hello World doesn't use any reusable components, so all its components are installed in <DocumentRoot>/WebObjects/Examples/HelloWorld.
A component is represented with a component directory that contains an HTML template, a WebScript file, and a declarations file. In addition to these three files, a component directory may also contain images and other resources used by the component.
The following sections describe the files for the Main and Hello components of the Hello World application.